home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / SED15.ARJ / SED14B.PCH < prev    next >
Text File  |  1991-09-23  |  6KB  |  142 lines

  1. 
  2. Return-Path: <helman@elm.sdd.trw.com>
  3. Received: from elm.sdd.trw.com.sdd.trw.com by deneva.sdd.trw.com (4.1/SMI-4.0 TRW 1.8)
  4.     id AA03240; Mon, 23 Sep 91 09:24:14 PDT
  5. Received: by elm.sdd.trw.com.sdd.trw.com (4.1/SMI-4.1)
  6.     id AA02072; Mon, 23 Sep 91 09:24:22 PDT
  7. Date: Mon, 23 Sep 91 09:24:22 PDT
  8. From: helman@elm.sdd.trw.com (Howard L. Helman)
  9. Message-Id: <9109231624.AA02072@elm.sdd.trw.com.sdd.trw.com>
  10. To: kirsch@usasoc.soc.mil
  11. Subject: Updates to SED14
  12. Cc: bsu-cs!mdlawler@iuvax.cs.indiana.edu
  13.  
  14. David, Mike and any others:
  15.  
  16. I finally got around to testing the sed14 version.  I was sorry
  17. that my updates I sent you on Friday were incorrect.  I thought
  18. I tested them but I do this at night at home and I must have  been
  19. asleep.  I don't feel as bad after finding the mistranslation in the
  20. N command.  I still find it easier to read and understand without the
  21. explicit test but any consistent style is fine.  So I am sending you
  22. these fixes and an updated version of the documentation in zoo format.
  23.  
  24.  
  25. As promised the inline pragmas to allow compilation are:
  26. #pragma warn -pia    /* silence prob incorrect assignment */
  27. #pragma option -K-   /* signed characters*/
  28.  
  29. These work with TC++ and BC++.  I am surprised that you are
  30. still using TC2.  I got off of it over a year ago.  It was
  31. a good system but the newer compilers are great especially 
  32. for the upgrade prices.  I found the C++ set to be a complete
  33. ANSI compiler and although there are a few bugs in it, most
  34. of the problems with TC2 have been fixed. 
  35.  
  36. h**2
  37.  
  38. These changes have been extensively tested, and fix the following:
  39.  
  40.    ! processing with no addresses
  41.    } command with !
  42.    N command error
  43.    * and + normal if not at repeatable spot big error  by me
  44.    \{ processing  m processing error and 0 allowed
  45.    A clean up in sedcomp 
  46.    A recommendation for D command
  47.  
  48. Fixes in SEDCOMP.C:
  49.  clean up ! processing  delete lines 313 and 314
  50.   312:            case '{':                     /* start command group */
  51.   313: xx               if(!cmdp->addr1)   /* no address is special*/
  52.   314: xx                  cmdp->command=(cmdp->flags.allbut?BCMD:NOCMD);
  53.   315:                  cmdp->flags.allbut = !cmdp->flags.allbut;
  54.  
  55.  do not allow ! option } commands  add test to line 322
  56.   321:            case '}':                            /* end command group */
  57.   322:                  if (cmdp->addr1||cmdp->flags.allbut)
  58.                                --------------------                 
  59.  
  60.  Bug in processing * + in REs  move assmgt from 465 to after 467, 473, 482,
  61.     and 485.  Fix typo on 478 and 502.  This was a biggie
  62.   464:            switch (c) {
  63.   465:                 case '\\':lastep=0;
  64.                  xxxxxxxxx                    
  65.   466:                  if ((c = *cp++) == '(') {  /* start tagged section */
  66.   467:                    if (bcount >= MAXTAGS) return 0;
  67.               lasetep=0;
  68.               ++++++++++
  69.  
  70.   473:                    if (brnestp <= brnest) return 0;/* extra \) */
  71.                   lastep=0;               
  72.                   +++++++++
  73.   474:                    *fp++ = CKET;                 /* enter end-of-tag */
  74.  
  75.   477:                    break;}
  76.   478:                  else if(c=='{'){if(!lastep) return 0; /* rep error*/
  77.                                 **
  78.   479:                    *lastep|=MTYPE; lastep=0;
  79.  
  80.   482:                  else if(c=='<'){   /*begining of word test*/
  81.                   lastep=0;
  82.               +++++++++
  83.   483:                    *fp++=CBOW;
  84.   484:                    break;}
  85.  
  86.   485:                  else if(c=='>'){/*end of word test*/
  87.               lastep=0;
  88.               +++++++++    
  89.   486:                    *fp++=CEOW;
  90.   487:                    break;}
  91.  
  92.   501:                 case '+':        /* 1 to n repeats of previous pattern */
  93.   502:                  if(!lastep)   goto defchar;
  94.                     **
  95.   503:                  *lastep|=MTYPE; lastep=0; *fp++=1;*fp++=0xFF;
  96.  
  97.  
  98.  Bug in processing \{ expressions delete line 547; This was removed once
  99.  also add test on 549 to disallow 0 times.
  100.   546:  static int processm(Void) {int i1=0,i2=0;
  101.   547:    cp++; /*move past bracket*/
  102.       xxxxxxxxxxxxxxxxxxxxxxxxxxx
  103.   548:    while(isdigit(*cp))i1=i1*10+*cp++-'0';
  104.   549:    if(i1<=0||i1>255)return 0;
  105.              -------
  106.   550:    *fp++ = (char)i1;Bug fixes for SEDEXEC.C
  107.  
  108.  I think the correct way to handle D commands (after rereading the Unix stuff)
  109.  is to change line 130 to the following.  I.e. after a D start over without
  110.  a line read.  Any Unixers got any ideas???  I did not make this change.
  111.       /*while(cdswitch||spend=getline(linebuf)!=NULL){ */ /* v1.5 if approved*/
  112.   130:       while( (spend=getline(cdswitch?spend:linebuf))!= NULL){ /* v1.4 */
  113.  
  114.  Exec fix for ! commands with no address delete test from line 137
  115.   137:                    if (ipc->addr1 && !selected(ipc)) {ipc++;continue;}
  116.                           xxxxxxxxxxxxx              
  117.  
  118. There appears to be no reason for the test on line 145 just do the assmnt
  119.   145:                       if ((ipc = ipc->u.link) == 0) {ipc = cmds;break;}}
  120.                              xxxxx                 xxxxxxxxxxxxxxxxxxxxxxxxxx x
  121.  
  122. The final exec fix for ! with no address add the following before line 169
  123.        if(!p1)return !ipc->flags.allbut;
  124.        +++++++++++++++++++++++++++++++++ 
  125.   169:     if( (ans=ipc->flags.inrange) != 0) ; /* v1.4 */
  126.  
  127.  Fix the `oldstuf' stuff for a correct test  in an N command.
  128.  I highly recommend only one form.   I prefer mine because of the
  129.  error here but after the fix the explicit test version is ok by me
  130.   467:  #ifdef OLDSTUF  /* v1.4 */
  131.   468:                     if(!(execp=getline(spend)))pending=ipc,delete=TRUE;
  132.   469:  #else
  133.   470:                    if( (execp=getline(spend)) == 0)        /* v1.4 */
  134.                         == not != !!!!!!!!!!!!!!!!!!!!
  135.   471:                              pending=ipc,delete=TRUE;
  136.   472:  #endif
  137.   473:                          else pending=NULL,spend=execp;
  138.  
  139.  
  140.  
  141. 
  142.